//
// Created by ChaoDONG on 2021-03-16.
//

/* platinum.c -- your weight in platinum */
#include <stdio.h>

int main(void)
{
    float weight; /* 使用者体重 */

    float value; /* 等重白银 */

    printf("Are you worth your weight in platinum?\n");

    printf("Let's check it out.\n");

    printf("Please enter your weight in pounds: ");

    /* 获取用户的输入 */
    scanf("%f", &weight);
    /*scanf()函数用于读取键盘的输入。%f说明scanf()要读取用户从键盘输入
    的浮点数，&weight告诉 scanf()把输入的值赋给名为 weight 的变量*/

    /* 假设白金的价格是每盎司$1700 */

    /* 14.5833用于把英镑常衡盎司转换为金衡盎司 */
    value = 1700.0 * weight * 14.5833;

    printf("\nYour weight in platinum is worth $%.2f.\n", value);

    printf("You are easily worth that! If platinum prices drop,\n");

    printf("eat more to maintain your value.\n");

    return 0;
}